﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[ExecuteInEditMode] //让代码在编辑器状态运行
public class D04_OnGUI1 : MonoBehaviour
{
    public Rect butonRect = new Rect(80, 80, 80, 40);
    public Rect titleRect = new Rect(80, 80, 80, 40);

    private void OnGUI()
    {
        GUI.Label(titleRect, "英雄联盟");

        if (GUI.Button(butonRect, "开始游戏"))
        {
            Debug.Log("开始游戏");
        }
    }
}